Inside Macintosh: QuickTime Components

Previous | Chapter Top | Chapter Contents | Next

The Compression Information Structure

The compression information structure defines the characteristics of a buffer that contains a captured image that has been compressed. Callback functions use compression information structures to exchange information about compressed images. For example, the compress-complete function must format a compression information record whenever a video frame is compressed (see "Video Channel Callback Functions," for more information about the compress-complete callback function). The SGCompressInfo data type defines a compression information structure.

struct SGCompressInfo {
    Ptr                 buffer;         /* buffer for compressed image */
    unsigned long       bufferSize;     /* bytes of image data in buffer */
    unsigned char       similarity;     /* relative similarity */
    unsigned char       reserved;       /* reserved--set to 0 */
};
typedef struct SGCompressInfo SGCompressInfo;
buffer
Points to the buffer that contains the compressed image. This pointer must contain a 32-bit clean address.
bufferSize
Specifies the number of bytes of image data in the buffer.
similarity
Indicates the relative similarity of this image to the previous image in a sequence. A value of 0 indicates that the current frame is a key frame in the sequence. A value of 255 indicates that the current frame is identical to the previous frame. Values from 1 through 254 indicate relative similarity, ranging from very different (1) to very similar (254).
reserved
Reserved for use by Apple. Set this field to 0.

© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next